<template>
  <div class="error-page">
    <div class="error-content">
      <h1 class="error-code">404</h1>
      <h2 class="error-title">页面未找到</h2>
      <p class="error-desc">抱歉，您访问的页面不存在或已被删除</p>
      <div class="error-actions">
        <el-button type="primary" @click="goHome">返回首页</el-button>
        <el-button @click="goBack">返回上页</el-button>
      </div>
    </div>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router'

const router = useRouter()

const goHome = () => {
  router.push('/')
}

const goBack = () => {
  router.go(-1)
}
</script>

<style scoped lang="scss">
.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  
  .error-content {
    text-align: center;
    color: white;
    padding: 2rem;
    
    .error-code {
      font-size: 8rem;
      font-weight: bold;
      margin: 0;
      text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    }
    
    .error-title {
      font-size: 2rem;
      margin: 1rem 0;
      font-weight: 300;
    }
    
    .error-desc {
      font-size: 1.1rem;
      margin: 1rem 0 2rem;
      opacity: 0.9;
    }
    
    .error-actions {
      .el-button {
        margin: 0 0.5rem;
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
      }
    }
  }
}
</style>
